@prefixCls: h3-organization;
@import './../../../../../../../../common/common.less';
.h3-organization__label{
  min-height: 32px;
  // overflow-x: hidden;
  // overflow-y: auto;
  border-radius: 2px;
  position: relative;
  padding: 3px 5px 0 5px;
  line-height: 1.4em;
  

  &.disabled{
    color: rgba(0, 0, 0, 0.25);
    background-color: #f5f5f5;
    border: 1px solid #d9d9d9 !important;
  }

  &.show-select{
    border: 1px solid #d9d9d9;
    overflow: scroll;
    &::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
    &:hover{
      border-color: @primary-color;
    }

    &:focus{
      border-color: @primary-color;
      box-shadow: 0 0 0 2px @primary-light-color;
      outline: 0;
    }

  }

  &.has-val{
    padding-bottom: 0px;
  }
  // padding-bottom: 3px;
  .h3-organization-selected {
    position: relative;
    // display: inline-block;
    background:rgba(250,250,250,1);
    border-radius:4px;
    border:1px solid #D9D9D9;
    padding: 0 24px 0 26px;
    margin: 0 8px 3px 0;
    height: 24px;
    max-width: 100%;
    // float: left;
    display: inline-block;
    
    i,span{
      font-size: 12px;
      color: #BFBFBF;
      transform: translateY(-50%);
      position: absolute;
      top:50%;
      &:first-child{
        left: 8px;
        margin-right: 6px;
      }
      &:last-child{
        width: 10px;
        height: 10px;
        font-size: 10px;
        line-height: 10px;
        margin-left: 8px;
        right: 8px;
        top: 65%;
        cursor: pointer;
        &:before{
          display: inline-block;
          transform: translateY(-2px);
        }
      }
    }
    &-name{
      display: inline-block;
      max-width: 215px;
      .overflow-ellipsis();
      // margin-top: calc((24px - @font-size-12) / 2);
      font-size: @font-size-12;
      line-height: 22px;
    }
  }
  .delete{
    position: absolute;
    // top: 50%;
    top: 1.15em;
    transform: translateY(-50%);
    line-height: 0;
    color: rgba(0, 0, 0, 0.25);
    right: 12px;
    cursor: pointer;
  }

  & > span{
    color: @light-color-4;
    display: inline-block;
    // height: 30px;
    line-height: 24px;
    margin:0 6px;
  }

}
.overflow-y-scroll() {
  overflow-y:scroll;
  overflow-x:hidden;
  &::-webkit-scrollbar{
    width: 5px;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(0,0,0,0.45);
  }
  &::-webkit-scrollbar-track {
      border-radius: 10px;
      background: #ffffff;
  }

};
.overflow-ellipsis() {
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
};
.dropdownClassName{
  display: none;
}
.@{prefixCls}{
  &-select{
    margin-right: 4px;
    font-size: 14px;
    color: rgba(0,0,0,0.25);
  }
  &-body{
    display:flex;
    margin-left: 24px;
    margin-right: 24px;
    border-radius: 2px;
    border: 1px solid #DDDDDD;
    &-left{
      padding: 16px;
      // width: calc(100% - 389px);
      width: 50%;
      height: 488px;
      border-right: 1px solid #E8E8E8;
      .@{prefixCls}-body-search{
        position: relative;
        display: flex;
        align-items: center;
        >i{
          position: absolute;
        }
        .h3-organization-body-close-circle-icon{
          right: 25px;
        }
        .h3-organization-body-search_icon{
          right: 8px;
        }
        &_icon{
          color: @light-color-4;
          position: absolute;
        }
        &_input{
          width: 100%;
          height: 32px;
          padding: 5px 12px;
          padding-right: 42px;
          border: 1px solid #D4D5D6;
          caret-color: @primary-color;
          border-radius: 2px;
          &:active,&:focus{
            border-color:  #2970FF;
            box-shadow: 0px 0px 0px 2px rgba(41, 112, 255, 0.2);
          }
          &::-webkit-input-placeholder {
            color: @light-color-4;
          }
        }
        &-result{
          position: absolute;
          top: 34px;
          left: 0;
          width: 342px;
          height: 392px;
          z-index: 2;
          background: rgba(255,255,255,1);
          box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
          border-radius: 4px;
          .@{prefixCls}-search-title{
            margin: 4px 0;
            padding: 8px 12px;
            color: rgba(17, 18, 24, 0.5);
            font-size: 12px;
            span:nth-child(2){
              float: right;
            }
          }
          .@{prefixCls}-search-content{
            height: calc(100% - 38px);
            .overflow-y-scroll();
            &-item{
              display: flex;
              align-items: center;
              height: 48px;
              &_checkbox{
                flex: auto;
                width: 48px;
                text-align: center;
              }
              .@{prefixCls}-search-item-info{
                flex-basis: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                padding-right: 16px;
                overflow: hidden;
                &_avatar{
                  width: 28px;
                  height: 28px;
                  display: inline-block;
                  border-radius: 24px;
                  font-size: 12px;
                  margin-right: 8px;
                  text-align: center;
                  img{
                    width: 100%;
                    height: 100%;
                    border-radius: 100%;
                  }
                }
                &_avatar_org{
                  width: 28px;
                  height: 28px;
                  background: rgba(17, 18, 24, 0.5);
                  font-size: 17px;
                  color: #fff;
                }
                &-main{
                  height: 100%;
                  // padding: 6px 0;
                  display: flex;
                  flex-direction: column;
                  flex: 1;
                  overflow: hidden;
                  span{
                    height: 24px;
                    .overflow-ellipsis();
                  }
                  span:first-child{
                    color: #111218;
                    line-height: 24px;
                  }
                  span:nth-child(2){
                    font-size: 12px;
                    color: rgba(17, 18, 24, 0.5);
                    line-height: 17px;
                  }
                }
              }
              &:hover{
                background-color: #EEF4FD;
              }

            }
          }
        }
        &-result--nodata{
          height: 83px;
          text-align: center;
          padding: 32px 0;
        }
      }
      .@{prefixCls}-body-org{
        display: flex;
        flex-direction: column;
        padding: 8px 6px 8px 0;
        height: calc(100% - 20px);
        margin-right: -22px;
        &-breadcrumb{
          margin-bottom: 12px;
          padding-right: 16px;
          padding-left: 6px;
          max-height: 70px;
          .overflow-y-scroll();
          .h3-organization-breadcrumb-item{
            cursor: pointer;
            color: @highlightColor;
          }
          .h3-organization-breadcrumb-item:last-child{
            cursor: default;
            color: #111218;
            // font-weight: 600;
          }
          .ant-breadcrumb-separator {
            margin: 0 4px;
          }
          .role-label{
            color: #111218;
          }
        }
        &-tree{
          flex: 1;
          padding-right:16px;
          .overflow-y-scroll();
          .@{prefixCls}-tree-item{
            padding: 0 6px;
            height: 48px;
            line-height: 48px;
            display: flex;
            justify-content: space-between;
            &:hover{
              background-color: #EEF4FD;
            }
            &_checkbox{
              margin-right: 8px;
              flex: 1;
              .overflow-ellipsis();

              .ant-checkbox+span{
                vertical-align: middle;
                line-height: 1;
                top: -.09em;
                position: relative;
              }

            }
            &_child{
              cursor: pointer;
              color: @highlightColor;
              i,span{
                margin-right: 4px;
              }
            }
            &_child--nochildren{
              color: #ccc;
              cursor: not-allowed;
            }
            &_child--selected{
              color:rgba(0,0,0,0.25);
            }
            .default-avatar{
              color: #ffb131;
              vertical-align: middle;
              position: absolute;
              top: 5px;
            }
          }
          .no-data-content {
            margin-top: 50px;
            text-align: center;
            min-height: 330px;
            img {
              display: block;
              margin: 0 auto;
            }
            span{
              font-size: 14px;
              color: rgba(17, 18, 24, 0.5);
              line-height: 22px;
            }
          }
        }
      }
    }
    &-right{
      // width: calc(100% - 389px);
      width: 50%;
      height: 488px;
      .@{prefixCls}-selected{
        position: relative;
        display: inline-block;
        background:rgba(250,250,250,1);
        border-radius:4px;
        border:1px solid #D9D9D9;
        padding: 0 24px 0 26px;
        margin: 0 8px 8px 0;
        height: 22px;
        max-width: 100%;
        i,span{
          font-size: 12px;
          color: #BFBFBF;
          transform: translateY(-50%);
          position: absolute;
          top:50%;
          &:first-child{
            left: 8px;
            margin-right: 6px;
          }
          &:last-child{
            width: 10px;
            height: 10px;
            font-size: 10px;
            margin-left: 8px;
            right: 8px;
            top: 48%;
            &:before{
              display: inline-block;
              transform: translateY(-2px);
            }
          }
        }
        &-name{
          display: inline-block;
          // max-width: 215px;
          .overflow-ellipsis();
        }
      }
      .@{prefixCls}-statistics{
        padding: 22px 16px 12px 16px;
        text-align: left;
        font-size: 12px;
        color: #111218;
        line-height: 20px;
        >div{
          display: inline-block;
        }
        .remove-selected{
          font-size: 12px;
          color: @highlightColor;
          line-height: 20px;
          float: right;
          cursor: pointer;
        }
      }
      .@{prefixCls}-selected-content{
        height: calc(100% - 65px);
        .overflow-y-scroll();
        &-item{
          padding: 0 6px;
          margin-left: 16px;
          margin-right: 16px;
          display: flex;
          align-items: center;
          height: 48px;
          border-radius: 2px;
          &_checkbox{
            flex: auto;
            width: 48px;
            text-align: center;
          }
          .@{prefixCls}-selected-item-info{
            flex-basis: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            overflow: hidden;
            &_avatar{
              width: 28px;
              height: 28px;
              display: inline-block;
              border-radius: 24px;
              font-size: 12px;
              margin-right: 8px;
              text-align: center;
              img{
                width: 100%;
                height: 100%;
                border-radius: 100%;
              }
            }
            &_avatar_org{
              width: 28px;
              height: 28px;
              background: rgba(17, 18, 24, 0.5);
              font-size: 17px;
              color: #fff;
            }
            &-main{
              height: 100%;
              // padding: 6px 0;
              display: flex;
              flex-direction: column;
              flex: 1;
              overflow: hidden;
              span{
                height: 24px;
                .overflow-ellipsis();
              }
              span:first-child{
                color: #111218;
                line-height: 24px;
              }
              span:first-child.top-height{
                height: 48px;
                line-height: 48px;
              }
              span:nth-child(2){
                font-size: 12px;
                color: rgba(17, 18, 24, 0.5);
                line-height: 17px;
              }
            }
            .h-icon-all-close{
              cursor: pointer;
            }
          }
          &:hover{
            background-color: #EEF4FD;
          }

        }
      }

    }
  }
  &-footer{
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: 0;
  }



}

.h3-organization__plus{
  .plus-icon{
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border: 1px solid #DEE0EA;
    border-radius: 50%;
    cursor: pointer;
  }
  &.show-select{
    .plus-icon{
      background: #fff;
      &:hover{
        border-color: #2970FF;
        .h-icon-all-plus-o,
        .h-icon-all-retweet{
          color: #2970FF;
        }
      }
      &:focus{
        box-shadow: 0px 0px 0px 2px rgba(49, 94, 251, 0.2);
        .h-icon-all-plus-o{
          color: #2970FF;
        }
      }
      .h-icon-all-plus-o{
        font-size: 16px;
        color: rgba(17, 18, 24, 0.5);
      }
    }
  }
  &.has-val{
    .plus-icon{
      display: inline-block;
      vertical-align: middle;
      background: #F5F6F9;
      &:focus{
        box-shadow: 0px 0px 0px 2px rgba(49, 94, 251, 0.2);        
        .h-icon-all-retweet{
          color: #2970FF;
        }
      }
      &:hover{
        border-color: #2970FF;
      }
      .h-icon-all-retweet{
        font-size: 16px;
        color: #BBBECA;
      }
    }
    .h3-organization-selected-box{
      margin-left: 12px;
      display: inline-block;
      .h3-organization-selected{
        position: relative;
        margin-right: 12px;
        display: inline-block;
        height: 32px;
        background: #EFEFEF;
        border-radius: 16px;
        .ant-avatar-image,
        .ant-avatar-circle{
          height: 32px !important;
          width: 32px !important;
        }
        .default-avatar{
          color: #ffb131;
          font-size: 32px;
          line-height: 1;
          display: inline-block;
          vertical-align: middle;
        }
        .h3-organization-selected-name{
          margin: 4px;
          padding-right: 4px;
          font-size: 14px;
          color: #121933;
          line-height: 22px;
        }
        .h3-organization-selected-action{
          position: absolute;
          right: 0;
          top: 0;
          display: none;
          width: 32px;
          height: 32px;
          line-height: 32px;
          background: linear-gradient(270deg, #E6E3E3 0%, #F4F1F1 67%, rgba(227, 230, 236, 0) 100%);
          border-radius: 15px;
          text-align: center;
          .h-icon-all-close{
            background: rgba(17, 18, 24, 0.25);
            font-size: 13px;
            border-radius: 50%;
            cursor: pointer;
          }
        }
      }
      .h3-organization-selected:hover{
        .h3-organization-selected-action{
          display: inline-block;
        }
      }
      .h3-organization-selected-ellipsis{
        padding: 0 10px;
        display: inline-block;
        background: #EFEFEF;
        border-radius: 16px;
        height: 32px;
        line-height: 32px;
        color: #121933;
      }
    }
  }
}